﻿@using BusinessBingo.Web.Models.ViewModels;

@model BusinessBingo.Web.Models.ViewModels.GroupPlayViewModel

@section Scripts { 
    @{ Html.RenderPartial("CheckWordScript"); }

        <script type="text/javascript">
            $(function () {
                setInterval(function () {
                    $.get('@Url.Action("GetOpponents", "Group", new { gameId = Model.GameId })', {},
                        function (view) {
                            $("div#opponents").html(view);
                        })
                }, 30000);

            }); 

    </script>
}

@{
    ViewBag.Title = " - " + @Resources.Global.SiteSubtitle;
}

@if (Model.IsFinished == true) { 
	<div class="box-12-expand">
		<div class="box-12">
			<p class="normalBox highlightedBox">@Resources.Home.Win - <b>@Html.ActionLink(Resources.Home.NewGame, "New", "Game")</b></p>
		</div>
	</div>
}

@{Html.RenderPartial("PlayerBingoSet", new BoxedBingoSetViewModel(Model.PlayerBingoSet, 8));}
<div id="opponents">
    @{Html.RenderPartial("GetOpponents", Model.GetOpponentsViewModel);}
</div>